package com.txc.pay.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.txc.pay.entity.PayLogEntity;
import com.txc.pay.mapper.PayLogMapper;
import com.txc.pay.service.IPayLogService;
import org.springframework.stereotype.Service;

import jakarta.annotation.Resource;
import java.util.List;

/**
 * 支付记录表 服务实现类
 *
 * @author TXC
 * @since 2023-12-26
 */
@Service
public class PayLogServiceImpl extends ServiceImpl<PayLogMapper, PayLogEntity> implements IPayLogService {
    @Resource
    public PayLogMapper payLogMapper;

    @Override
    public List<PayLogEntity> getPayLogByTransactionId(String transactionId) {
        LambdaQueryWrapper<PayLogEntity> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(PayLogEntity::getTransactionId, transactionId);
        return payLogMapper.selectList(queryWrapper);
    }


}
